<?php
namespace App\Models\Sponsor;

class SponsorRepository implements \App\Contracts\Repositories\SponsorRepository
{
    /**
     * @param Sponsor $sponsor
     * @return bool
     */
    public function create(Sponsor $sponsor)
    {
        return $sponsor->save();
    }

    /**
     * @param $prizeId
     * @return mixed
     */
    public function deleteByPrizeId($prizeId)
    {
        return Sponsor::where('prize_id', $prizeId)->delete();
    }

    public function getListByPrizeIds($prizeIds)
    {
        return Sponsor::query()->where('prize_id', $prizeIds)->get();
    }
}
